def speak(self):
    print(f"外层定义的speak,{self.name}")


# 多重继承遵循mro原则，最顶层的类是object
class A:
    def speak(self):
        print("A")


class B(A):
    def speak(self):
        print("B")


class C(A):
    def speak(self):
        print("C")


class D(B, C):
    def speak(self):
        print("D")


print("A.mro=", A.mro())
print("B.mro=", B.mro())
print("C.mro=", C.mro())
print("D.mro=", D.mro())


d = D()
d.name = "husky"

d.speak()
